/**
 * 
 */
package me.cloudcat.develop.entity.configuration;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Version;

import me.cloudcat.develop.entity.BaseEntity;

/**
 * 
 * @author ZZWang
 * @Time 2017年1月17日  下午2:55:54
 *
 */
@Entity
@Table(name = "tbl_user_group")
//@SequenceGenerator(name = "SEQ_STORE", sequenceName = "TBL_USER_GROUP_ID_ASQ", allocationSize = 1)
public class UserGroup extends BaseEntity<UserGroup> {

	private static final long serialVersionUID = -9124330024205868929L;

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name="account")
	public User user;

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name="gro")
	public Group group;

	@Version
	private int version;

	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Group getGroup() {
		return group;
	}

	public void setGroup(Group group) {
		this.group = group;
	}
}
